//
//  WmcWatermarkSelectDelegate.swift
//  YPWatermarkCamera
//
//  Created by 赵新 on 2022/8/1.
//

import UIKit

// MARK: - [WmcSelectWatermarkDelegate]

public protocol WmcSelectWatermarkDelegate: NSObjectProtocol {
    /// 水印选择器是否显示空水印按钮
    /// - Parameter attribute: 属性
    func watermarkSelectShowEmptyButton(_ attribute: WmcAttribute)
        -> Bool

    /// 设置水印选择器上Cell的按钮
    /// - Parameters:
    ///   - attribute: 属性
    ///   - watermarkModel: 当前的水印
    ///   - defaultList: 默认列表
    /// - Returns: 设置后的字段属性列表
    func watermarkSelectItemList(_ attribute: WmcAttribute,
                                 watermarkModel: WmcWatermarkDetailModel,
                                 defaultList: [WmcButtonItemType.SelectWMItem])
        -> [WmcButtonItemType.SelectWMItem]

    /// 点击水印后是否消失弹窗
    /// - Parameters:
    ///   - attribute: 属性
    ///   - watermarkModel: 点击的水印
    func watermarkSelectToDismiss(_ attribute: WmcAttribute,
                                  watermarkModel: WmcWatermarkDetailModel)
        -> Bool

    /// 是否显示底部的联系我们
    /// - Parameters:
    ///   - attribute: 属性
    /// - Returns: 是否
    func watermarkSelectShowBottomContantUs(_ attribute: WmcAttribute) -> Bool
}

// MARK: - 驱动方法

public extension WmcSelectWatermarkDelegate { }

// MARK: - =========================⚠️以下对接业务方无需查看或了解⚠️=========================

// MARK: 可选方法

public extension WmcSelectWatermarkDelegate {
    /// 水印选择器是否显示空水印按钮
    func watermarkSelectShowEmptyButton(_ attribute: WmcAttribute) -> Bool {
        return true
    }

    /// 设置水印选择器上Cell的按钮
    func watermarkSelectItemList(_ attribute: WmcAttribute,
                                 watermarkModel: WmcWatermarkDetailModel,
                                 defaultList: [WmcButtonItemType.SelectWMItem]) -> [WmcButtonItemType.SelectWMItem]
    {
        return defaultList
    }

    /// 点击水印后是否消失弹窗
    func watermarkSelectToDismiss(_ attribute: WmcAttribute,
                                  watermarkModel: WmcWatermarkDetailModel) -> Bool {
        return false
    }
    
    func watermarkSelectShowBottomContantUs(_ attribute: WmcAttribute) -> Bool {
        return true
    }
}
